home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-06 / an201x.zip / BTRIEVE.H < prev    next >
Text File  |  1991-12-19  |  5KB  |  157 lines

  1. /*****************************************************************************
  2. * File:        BTRIEVE.H       --     Btrieve defines and function prototype
  3. * Author:    Morgan B. Adair
  4. * Date:        12/15/91
  5. *****************************************************************************/
  6.  
  7. #ifndef __BTRIEVE_H
  8.  
  9. #define __BTRIEVE_H
  10.  
  11. /* Extended Type Flags */
  12.  
  13. #define BT_KEY_STR_TYPE        0
  14. #define BT_KEY_INT_TYPE        1
  15. #define BT_KEY_DUP        1
  16. #define BT_KEY_MOD        2
  17. #define BT_KEY_BIN        4
  18. #define BT_KEY_NULL        8
  19. #define BT_KEY_ZSTR_TYPE    11
  20. #define BT_KEY_SEG        16
  21. #define BT_KEY_ALT_COL_SEQ    32
  22. #define BT_KEY_DESC        64
  23. #define BT_KEY_SUPP        128
  24. #define BT_KEY_EXT_TYPE        256
  25. #define BT_KEY_MANUAL        512
  26.  
  27. /* Operation Codes */
  28.  
  29. #define    BT_OPEN                0
  30. #define    BT_CLOSE            1
  31. #define    BT_INSERT            2
  32. #define    BT_UPDATE            3
  33. #define    BT_DELETE            4
  34. #define    BT_GET_EQUAL            5
  35. #define    BT_GET_NEXT            6
  36. #define    BT_GET_PREVIOUS            7
  37. #define    BT_GET_GREATER            8
  38. #define    BT_GET_GREATER_OR_EQUAL        9
  39. #define    BT_GET_LESS            10
  40. #define    BT_GET_LESS_OR_EQUAL        11
  41. #define    BT_GET_FIRST            12
  42. #define    BT_GET_LAST            13
  43. #define    BT_CREATE            14
  44. #define    BT_STAT                15
  45. #define    BT_EXTEND            16
  46. #define    BT_SET_DIRECTORY        17
  47. #define    BT_GET_DIRECTORY        18
  48. #define    BT_BEGIN_TRANSACTION        19
  49. #define    BT_END_TRANSACTION        20
  50. #define    BT_ABORT_TRANSACTION        21
  51. #define    BT_GET_POSITION            22
  52. #define    BT_GET_DIRECT            23
  53. #define    BT_STEP_NEXT            24
  54. #define    BT_STOP                25
  55. #define    BT_VERSION            26
  56. #define    BT_UNLOCK            27
  57. #define    BT_RESET            28
  58. #define    BT_SET_OWNER            29
  59. #define    BT_CLEAR_OWNER            30
  60. #define    BT_CREATE_SUPP_INDEX        31
  61. #define    BT_DROP_SUPP_INDEX        32
  62. #define    BT_STEP_FIRST            33
  63. #define    BT_STEP_LAST            34
  64. #define    BT_STEP_PREVIOUS        35
  65. #define    BT_GET_NEXT_EXTENDED        36
  66. #define    BT_GET_PREVIOUS_EXTENDED    37
  67. #define    BT_STEP_NEXT_EXTENDED        38
  68. #define    BT_STEP_PREVIOUS_EXTENDED    39
  69. #define    BT_INSERT_EXTENDED        40
  70.  
  71. /* Status Codes */
  72.  
  73. #define BT_SUCCESS                 0
  74. #define BT_INVALID_OPERATION            1
  75. #define BT_IO_ERROR                2
  76. #define BT_FILE_NOT_OPEN            3
  77. #define BT_KEY_VALUE_NOT_FOUND            4
  78. #define BT_DUPLICATE_KEY_VALUE            5
  79. #define BT_INVALID_KEY_NUMBER            6
  80. #define BT_DIFFERENT_KEY_NUMBER            7
  81. #define BT_INVALID_POSITIONING            8
  82. #define BT_END_OF_FILE                9
  83. #define BT_MODIFIABLE_KEY_VALUE_ERR        10
  84. #define BT_INVALID_FILENAME            11
  85. #define BT_FILE_NOT_FOUND            12
  86. #define BT_EXTENDED_FILE_ERROR            13
  87. #define BT_PREIMAGE_OPEN_ERROR            14
  88. #define BT_PREIMAGE_IO_ERROR            15
  89. #define BT_EXPANSION_ERROR            16
  90. #define BT_CLOSE_ERROR                17
  91. #define BT_DISK_FULL                18
  92. #define BT_UNRECOVERABLE_ERROR            19
  93. #define BT_RECORD_MANAGER_INACTIVE        20
  94. #define BT_KEY_BUFFER_TOO_SHORT            21
  95. #define BT_DATA_BUFFER_LENGTH            22
  96. #define BT_POSITION_BLOCK_LENGTH        23
  97. #define BT_PAGE_SIZE_ERROR            24
  98. #define BT_CREATE_IO_ERROR            25
  99. #define BT_NUMBER_OF_KEYS            26
  100. #define BT_INVALID_KEY_POSITION            27
  101. #define BT_INVALID_RECORD_LENGTH        28
  102. #define BT_INVALID_KEY_LENGTH            29
  103. #define BT_NOT_A_BTRIEVE_FILE            30
  104. #define BT_FILE_ALREADY_EXTENDED        31
  105. #define BT_EXTEND_IO_ERROR            32
  106. #define BT_INVALID_EXTENSION_NAME        34
  107. #define BT_DIRECTORY_ERROR            35
  108. #define BT_TRANSACTION_ERROR            36
  109. #define BT_TRANSACTION_IS_ACTIVE        37
  110. #define BT_TRANSACTION_CONTROL_FILE_ERROR    38
  111. #define BT_END_ABORT_TRANSACTION_ERROR        39
  112. #define BT_TRANSACTION_MAX_FILES        40
  113. #define BT_OPERATION_NOT_ALLOWED        41
  114. #define BT_INCOMPLETE_ACCELERATED_ACCESS    42
  115. #define BT_INVALID_RECORD_ADDRESS        43
  116. #define BT_NULL_KEY_PATH            44
  117. #define BT_INCONSISTENT_KEY_FLAGS        45
  118. #define BT_ACCESS_TO_FILE_DENIED        46
  119. #define BT_MAXIMUM_OPEN_FILES            47
  120. #define BT_INVALID_ALTERNATE_SEQ_DEFINED    48
  121. #define BT_KEY_TYPE_ERROR            49
  122. #define BT_OWNER_ALREADY_SET            50
  123. #define BT_INVALID_OWNER            51
  124. #define BT_ERROR_WRITING_CACHE            52
  125. #define BT_INVALID_INTERFACE            53
  126. #define BT_VARIABLE_PAGE_ERROR            54
  127. #define BT_AUTOINCREMENT_ERROR            55
  128. #define BT_INCOMPLETE_INDEX            56
  129. #define BT_COMPRESSION_BUFFER_TOO_SHORT        58
  130. #define BT_FILE_ALREADY_EXISTS            59
  131. #define BT_REJECT_COUNT_REACHED            60
  132. #define BT_WORK_SPACE_TOO_SMALL            61
  133. #define BT_INCORRECT_DESCRIPTOR            62
  134. #define BT_DEADLOCK_DETECTED            78
  135. #define BT_CONFLICT                80
  136. #define BT_LOCK_ERROR                81
  137. #define BT_LOST_POSITION            82
  138. #define BT_READ_OUTSIDE_TRANSACTION        83
  139. #define BT_RECORD_IN_USE            84
  140. #define BT_FILE_IN_USE                85
  141. #define BT_FILE_TABLE_FULL            86
  142. #define BT_HANDLE_TABLE_FULL            87
  143. #define BT_INCOMPATIBLE_MODE_ERROR        88
  144. #define BT_REDIRECTED_DEVICE_TABLE_FULL        90
  145. #define BT_SERVER_ERROR                91
  146. #define BT_TRANSACTION_TABLE_FULL        92
  147. #define BT_INCOMPATIBLE_LOCK_TYPE        93
  148. #define BT_PERMISSION_ERROR            94
  149. #define BT_SESSION_NO_LONGER_VALID        95
  150. #define BT_COMM_ENVIRONMENT_ERROR        96
  151. #define BT_DATA_MESSAGE_TOO_SMALL        97
  152. #define BT_INTERNAL_TRANSACTION_ERROR        98
  153.  
  154. int BTRV(int OP, char *POS_BLK, char *DATA_BUF, int *DATA_LEN, char *KEY_BUF, int KEY_NUM);
  155.  
  156. #endif
  157.